package com.bruceliu.service.impl;

import com.bruceliu.bean.Food;
import com.bruceliu.mapper.FoodMapper;
import com.bruceliu.service.FoodService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @BelongsProject: RestaurantSystem
 * @BelongsPackage: com.bruceliu.service.impl
 * @Author: bruceliu
 * @QQ:1241488705
 * @CreateTime: 2020-02-29 20:23
 * @Description: TODO
 */
@Service
public class FoodServiceImpl implements FoodService {

    @Resource
    FoodMapper foodMapper;

    @Override
    public int totalCount(Food food) {
        return foodMapper.totalCount(food);
    }

    @Override
    public List<Food> getFoods(Map<String, Object> map) {
        return foodMapper.getFoods(map);
    }

    @Override
    public int addFood(Food food) {
        return foodMapper.addFood(food);
    }

    @Override
    public Food getById(int id) {
        return foodMapper.getById(id);
    }

    @Override
    public int updateFood(Food food) {
        return foodMapper.updateFood(food);
    }

    @Override
    public int deleteFood(int id) {
        return foodMapper.deleteFood(id);
    }

    @Override
    public int menu_totalCount(Map<String, Object> map) {
        return foodMapper.menu_totalCount(map);
    }

    @Override
    public List<Food> menu_getFoods(Map<String, Object> map) {
        return foodMapper.menu_getFoods(map);
    }
}
